/*
 * The simulated source processor's state of source process.
 */

#ifndef PROCESSORSTATE_H
#define PROCESSORSTATE_H

#include "crossbit/common.h"

namespace crossbit {
    class MemoryImage;
    // The Simulated Model of Source-Machine Processor State
    class ProcessorState {
        public:
            virtual ~ProcessorState() {}

            // Get the memory address of the simulated register.
            virtual XTMemAddr get(XTRegNum reg) const = 0;
            virtual XTMemAddr fpGet(XTRegNum reg) const = 0;

            // Get the value of the simulate register
            virtual XTInt32 reg(XTRegNum reg) const = 0;
            virtual XTInt32 fpReg(XTRegNum reg) const = 0;

            // Set the value of simulated register
            virtual void put(XTRegNum reg, XTInt32 value) = 0;
            virtual void fpPut(XTRegNum reg, XTInt32 value) = 0 ;

            // Get the number of *general-purpose* registers
            virtual int size() const = 0;
            virtual int fpSize() const = 0;

            virtual void dump() = 0;

			// switch virtual regs
			virtual void switchRegs(void) = 0;

			// restore virtual regs
			virtual void restoreRegs(void) = 0;

    };
}

#endif
